From: Florian Müllner Date: Sat, 1 Jul 2023 18:25:52 +0000 (+0200) Subject: ci: Look for matching ref in user remote for branch pipeline X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~1^2~176 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dbc9ebc6abc8c9e03dff327fce56122c8ac9a49f;p=gnome-shell.git ci: Look for matching ref in user remote for branch pipeline We currently only find a matching ref on the same remote in a merge request pipeline, but not in branch pipelines. It can occasionally be useful to run a pipeline without opening a merge request, so try the same remote here as well instead of just assuming origin. Part-of: --- diff --git a/.gitlab-ci/checkout-mutter.sh b/.gitlab-ci/checkout-mutter.sh index 765e39dcc..76375fdbf 100755 --- a/.gitlab-ci/checkout-mutter.sh +++ b/.gitlab-ci/checkout-mutter.sh @@ -41,8 +41,9 @@ if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then fi if [ -z "$mutter_target" ]; then + ref_remote=${CI_PROJECT_URL//gnome-shell/mutter} echo -n Looking for $CI_COMMIT_REF_NAME on remote ... - if fetch origin $CI_COMMIT_REF_NAME; then + if fetch $ref_remote $CI_COMMIT_REF_NAME; then echo \ found mutter_target=FETCH_HEAD else